<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>      
  <script>
    var text ='demo arigato!'

    function getText(){
      return text
    }

    function unless(ninjaCallback){
      return ninjaCallback()
    }

    console.log(unless(getText)===text);

    var values=[0,3,2,5,7,8,1]
    values.sort((a,b)=>a-b)
    console.log(values);

    //立即函数   
    +function(){
      console.log("立即执行");
    }()

    var puppeat ={
      rules:false,
    }
    function Emperor(){
      this.rules = true;
      return puppeat;
    }
    var em = new Emperor();
    console.log(em===puppeat);
    console.log(em.rules===false);
  </script> 
</body>
</html>